This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
Elif, check back. I will post an answer here when I am finished with it. The solution I ended up using does export the rich text but it's still rough - I will post the full solution here.
Meanwhile, must your output be .txt files? If so, you may be able to base your code somewhat on this. I just whipped this up in Notepad - I haven't tested it! But it is an idea! You will have to add error trapping and account for the fact that emails can have many fields named Body... Good luck!
Trish
Sub Initialize
Dim session As New NotesSession
Dim db as NotesDatabase
Dim dc as NotesDocumentCollection
Dim doc as NotesDocument
Dim fileNum As Integer
Dim fileName As String
Dim strFilePathSource As String
Dim rtitem as NotesRichTextItem
Set db = session.CurrentDatabase
Set dc = db.UnprocessedDocuments
For n = 0 to dc.count
Set doc = dc.GetNthDocument(n)
Set rtitem = doc.GetFirstItem("Body")
fileNum% = FreeFile()
fileName$ = "C:\Temp\yourfilename" + Cstr(n) + ".txt" '<--should obviously be unique
Open fileName$ For Output As fileNum
Write #fileNum%,"First line of text or a value here"
Write #fileNum%, rtitem.GetUnformattedText
Close fileNum%
Set doc = nothing
Next
End Sub
Feedback response number WEBB8V7TSF created by ~Phil Ekavitch on 06/12/2012